<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>角色管理</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/front/css/bootstrap.min.css"/>
</head>
<body>
<%@include file="/inc/menu.jsp"%>
<div class="container-fluid">
  <div class="main-content">
    <div class="row">
      <div class="col-sm-12">
        <ul class="nav nav-tabs nav-3rd">
          <li><span>角色管理</span></li>
          <li class="active">角色列表</li>
          <li><a href="${pageContext.request.contextPath}/admin/role/edit">新增角色</a></li>
        </ul>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-6">
        <a class="btn btn-primary" href="${pageContext.request.contextPath}/admin/role/edit">新增</a>
        <a class="btn btn-primary" href="#">删除</a>
      </div>
      <%--<div class="col-sm-5 col-sm-offset-1">--%>
        <%--<form id="searchForm" method="post" action="${pageContext.request.contextPath}/admin/role/list" name="role"--%>
              <%--htmlEscape="false">--%>
          <%--#set($pageNo = $pager.number + 1)--%>
          <%--#set($size = $pager.size)--%>
          <%--<input id="pageNo" name="pageNo" type="hidden" value="$pageNo"/>--%>
          <%--<input id="pageSize" name="pageSize" type="hidden" value="$size"/>--%>

          <%--<div class="input-group">--%>
            <%--<span class="input-group-addon">角色：</span>--%>
            <%--<input name="name" type="text" class="form-control" placeholder="请输入你要查询的角色" value="$!search"--%>
                   <%--onkeypress="var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(1,$pager.size);" >--%>
                        <%--<span class="input-group-btn">--%>
                          <%--<button class="btn btn-default" onclick="page(1,$pager.size)" type="submit">查询</button>--%>
                        <%--</span>--%>
          <%--</div>--%>
        <%--</form>--%>
      <%--</div>--%>
    </div>
    <div class="row">
      <div class="col-sm-12">
        <div>
          <table class="table table-bordered table-striped table-condensed table-hover">
            <thead>
            <tr>
              <th>
              <button id="check-all" class="btn btn-sm btn-default">全选</button>
              <button id="check-cancel" class="btn btn-sm btn-default hidden">取消</button>
            </th>
              <th>角色名称</th>
              <th>创建日期</th>
              <th>最后修改</th>
              <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${roleList}" var="role">
              <tr>
                <td><input id="" class="checkable" name="dele-role-id" type="checkbox" value=""></td>
                <td>${role.name}</td>
                <td>${role.createDate}</td>
                <td>${role.updateDate}</td>
                <td>
                  <a class="btn btn-default" href="${pageContext.request.contextPath}/admin/role/edit?id=${role.id}">修改</a>
                  <a class="btn btn-default" href="#" onclick="if (confirm('确认要删除该角色吗？此操作将不可恢复！'))
                                            location = '${pageContext.request.contextPath}/admin/role/delete/${role.id}';
                                            return false;">删除</a>

                </td>
              </tr>
            </c:forEach>
            </tbody>
          </table>
          <div class="row">
            <div class="col-sm-12">
              分页
            </div>
          </div>
        </div>
      </div>
    </div>

  </div>
</div>
</body>
</html>
